/**
 * Sep 14, 2009 4:27:46 PM 
 * esignature
 * com.smc.domain.model
 * Document
 */

package com.smc.domain.model;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author songduanlei
 * @version 0.0.1
 */
/**
 * @hibernate.mapping
 * schema="esignature"
 * @hibernate.class
 * table="t_document"
 * dynamic-update="true"
 * dynamic-insert="true"
 * select-before-update="true"
 * 文档数据模型
 */
public class Document implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8479029600938294574L;
	/**
	 * @hibernate.id
	 * generator-class="uuid"
	 * 主键 	
	 */
	public String uuid ;
	/**
	 * @hibernate.property
	 * 文件名
	 */
	private String fileName;
	/**
	 * @hibernate.property
	 * 医生文档规档时间
	 */
	private Timestamp createTime;
	/**
	 * @hibernate.property
	 * 操作员收到文档时间
	 */
	private Timestamp receivedTime;
	/**
	 * @hibernate.property
	 * 医生签名文档时间
	 */
	private Timestamp signTime;
	/**
	 * @hibernate.property
	 * 病人病历号
	 */
	private String medicalRecord ;
	/**
	 * @hibernate.property
	 * 文档中描述的病人
	 */
	private String patient;
	/**
	 * @hibernate.many-to-one
	 * column="hospital_uuid"
	 * 文档对应的医院。一个医院有多个文档。
	 * 这里是冗余设计。应该是一个医生有多个文档。
	 * 一个医院有多个医生。可以通过医生定位到医院。
	 * 基于业务设计冗余。
	 */
	private Hospital hospital;
	/**
	 * 文档对就医院的主键。这里在业务中要使用。但并不持久化
	 * 这个属性。
	 */
	private String hospitalUuid ;
	/**
	 * @hibernate.many-to-one
	 * column="user_uuid"
	 * 文档对应的医生。一个医生对就多个文档。
	 */
	private User user;
	/**
	 * 文档对应的医生主键。这里只在业务中实现。并不
	 * 持久化此属性。
	 */
	private String userUuid ;
	/**
	 * @hibernate.property
	 * 操作员文档病人的简单描述。
	 */
	private String introduction;
	/**
	 * @hibernate.property
	 * 文档是否签名。
	 */
	private boolean signed;
	/**
	 * @hibernate.property
	 * 文档是否阅读了。
	 */
	private boolean viewed;
	
	public Document() {
		
	}
	public Document(String uuid,User user) {
		this.uuid = uuid ;
		this.user = user ;
	}
	
	
	public Timestamp getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public String getIntroduction() {
		return introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	public String getPatient() {
		return patient;
	}
	public void setPatient(String patient) {
		this.patient = patient;
	}
	public Timestamp getReceivedTime() {
		return receivedTime;
	}
	public void setReceivedTime(Timestamp receivedTime) {
		this.receivedTime = receivedTime;
	}
	public boolean isSigned() {
		return signed;
	}
	public void setSigned(boolean signed) {
		this.signed = signed;
	}
	public Timestamp getSignTime() {
		return signTime;
	}
	public void setSignTime(Timestamp signTime) {
		this.signTime = signTime;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public String getUuid() {
		return uuid;
	}
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	public boolean isViewed() {
		return viewed;
	}
	public void setViewed(boolean viewed) {
		this.viewed = viewed;
	}
	public Hospital getHospital() {
		return hospital;
	}
	public void setHospital(Hospital hospital) {
		this.hospital = hospital;
	}
	public String getHospitalUuid() {
		return hospitalUuid;
	}
	public void setHospitalUuid(String hospitalUuid) {
		this.hospitalUuid = hospitalUuid;
	}
	public String getUserUuid() {
		return userUuid;
	}
	public void setUserUuid(String userUuid) {
		this.userUuid = userUuid;
	}
	public String getMedicalRecord() {
		return medicalRecord;
	}
	public void setMedicalRecord(String medicalRecord) {
		this.medicalRecord = medicalRecord;
	}

	
	

}
